package com.yjc.hire.work.service.impl;

import com.yjc.hire.work.mapper.SysParamsMapper;
import com.yjc.hire.work.service.SysParamsService;
import com.yjc.pojo.SysParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * </p>
 *
 * @author jcyin
 * @since 2025/8/25
 * </p>
 */

@Service
public class SysParamsServiceImpl implements SysParamsService {

    private final static Integer SYS_PARAM_REFRESH = 1001;

    @Autowired
    SysParamsMapper sysParamsMapper;
    @Override
    public void updateSysParams(Integer maxRefreshCount, Integer version) {
        SysParams sysParams = new SysParams();
        sysParams.setId(1001);
        sysParams.setMaxResumeRefreshCounts(maxRefreshCount);
        sysParamsMapper.updateById(sysParams);
    }

    @Override
    public SysParams getSysParams() {
        return sysParamsMapper.selectById(1001);
    }
}
